Xbasic

OBJECT.COPY_PREV_FIELD Function

Syntax

.Copy_prev_field([n flag ])

Arguments

flag

Optional. Default = 1. Flag determines which record is the "previous" record.

1 = Previous record is the record that was current immediately prior to going into Enter mode.
2 = Last physical record in the table.
3 = Logical record in the table based on the current index/query.

Description

Copies previous field on browses and forms.

Discussion

The <OBJECT>.COPY_PREV_FIELD() method applies to:

Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)

The <OBJECT>.COPY_PREV_FIELD() method copies the value from the corresponding field in the previous record into the current field. The layout must be in Enter mode.

Example

This button on a form copies values from the field in the previous record into the corresponding field in the current record that is being entered:

topparent.copy_prev_field()

Limitations

Desktop applications only.

See Also